home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the 3D Game Programming Gurus / gurus.iso / DirectX / dx9sdkcp.exe / SDK (C++) / Include / DShowIDL / mixerocx.idl < prev    next >
Encoding:
Text File  |  2002-11-12  |  3.1 KB  |  73 lines

  1. // Copyright (c) 1998  Microsoft Corporation.  All Rights Reserved.
  2. import "unknwn.idl";
  3.  
  4. // data id flags, used to notify the client whenever pertinent data changes
  5. #define MIXER_DATA_ASPECT_RATIO             0x00000001 // picture aspect ratio changed
  6. #define MIXER_DATA_NATIVE_SIZE              0x00000002 // native size of video changed
  7. #define MIXER_DATA_PALETTE                  0x00000004 // palette of video changed
  8.  
  9. // status flags defined here
  10. #define MIXER_STATE_MASK                    0x00000003 // use this mask with state status bits
  11. #define MIXER_STATE_UNCONNECTED             0x00000000 // mixer is unconnected and stopped
  12. #define MIXER_STATE_CONNECTED_STOPPED       0x00000001 // mixer is connected and stopped
  13. #define MIXER_STATE_CONNECTED_PAUSED        0x00000002 // mixer is connected and paused
  14. #define MIXER_STATE_CONNECTED_PLAYING       0x00000003 // mixer is connected and playing
  15.  
  16. interface IMixerOCXNotify;
  17. interface IMixerOCX;
  18.  
  19. [
  20.     object,
  21.     uuid(81A3BD31-DEE1-11d1-8508-00A0C91F9CA0),
  22.     helpstring("IMixerOCXNotify Interface"),
  23.     pointer_default(unique)
  24. ]
  25. interface IMixerOCXNotify : IUnknown
  26. {
  27.     // invalidates the rect
  28.     HRESULT OnInvalidateRect([in] LPCRECT lpcRect);
  29.  
  30.     // informs that a status change has occured, new status bits provided in ulStatusFlags
  31.     HRESULT OnStatusChange([in] ULONG ulStatusFlags);
  32.  
  33.     // informs that data parameters, whose id is present in ilDataFlags has changed
  34.     HRESULT OnDataChange([in] ULONG ulDataFlags);
  35. };
  36.  
  37. [
  38.     object,
  39.     uuid(81A3BD32-DEE1-11d1-8508-00A0C91F9CA0),
  40.     helpstring("IMixerOCX Interface"),
  41.     pointer_default(unique)
  42. ]
  43. interface IMixerOCX : IUnknown
  44. {
  45.     // used to notify the mixer that the display mode has changed, the mixer handles this
  46.     // asynchronously and the calls OnStatusChange(MIXER_DISPLAYCHANGE_HANDLED) when processing
  47.     // is done
  48.     HRESULT OnDisplayChange([in] ULONG ulBitsPerPixel, [in] ULONG ulScreenWidth, [in] ULONG ulScreenHeight);
  49.  
  50.     HRESULT GetAspectRatio([out] LPDWORD pdwPictAspectRatioX, [out] LPDWORD pdwPictAspectRatioY);
  51.  
  52.     HRESULT GetVideoSize([out] LPDWORD pdwVideoWidth, [out] LPDWORD pdwVideoHeight);
  53.  
  54.     HRESULT GetStatus([out] LPDWORD *pdwStatus);
  55.  
  56.     // the dc provided here is not supposed to be cached. If apps have set a dc using
  57.     // SetDrawInfo, then it is illegal to provide a non NULL argument here
  58.     HRESULT OnDraw([in] HDC hdcDraw, [in] LPCRECT prcDraw);
  59.  
  60.     // lpptTopLeftSC should be NULL unless MIXER_DRAW_DC_ONSCREEN is set to TRUE
  61.     // specifying a NULL value for lprcClip means no clipping
  62.     // lpptTopLeftSC - top left corner of surface/dc in screen coordinates
  63.     // prcDrawCC - draw rectangle in surface/dc coordinates
  64.     // lprcClip - clipping rect in surface/dc coordinates (optional)
  65.     HRESULT SetDrawRegion([in] LPPOINT lpptTopLeftSC, [in] LPCRECT prcDrawCC, [in] LPCRECT lprcClip);
  66.  
  67.     // function to set the sink interface for client notification
  68.     HRESULT Advise([in] IMixerOCXNotify *pmdns);
  69.  
  70.     // function to remove the sink interface
  71.     HRESULT UnAdvise();
  72. };
  73.